<template>
	<view class="bg-img bg-img-cover" :style="'background:url('+src+')'">
		<slot></slot>
	</view>
</template>

<script>
	export default {
		name: "gt-img",
		props: {
			defaultSrc: {
				type: String,
				default: ''
			},
			src: {
				type: String,
				default: ''
			},
			mode: {
				type: String,
				default: 'aspectFill'
			}
		},
		created() {
		},
		mounted() {
				this.createSelectorQuery();
		},
		data() {
			return {
				query: null
			}
		},
		computed: {},
		methods: {
			createSelectorQuery(){
				
				// let query = uni.createSelectorQuery(this);
				// query.selectAll('.bg-img').boundingClientRect(data => {
				//   console.log("得到布局位置信息" + JSON.stringify(data));
				// }).exec();
			}
		}
	}
</script>

<style lang="scss">
	
</style>
